#include "binaryTree.h"
#define RECURSIVE
BiTree test()
{
    BiTNode *p = NULL;
    BiTree tree = initBinaryTreeNode('a');
    p = tree;
    p->right = initBinaryTreeNode('f');
    p = p->right;
    p->right = initBinaryTreeNode('g');
    p = p->right;
    p->left = initBinaryTreeNode('h');

    p = tree;
    p->left = initBinaryTreeNode('b');
    p = p->left;
    p->right = initBinaryTreeNode('c');
    p = p->right;
    p->left = initBinaryTreeNode('d');
    p->right = initBinaryTreeNode('e');
    return tree;
}

int main(void)
{
    BiTree tree = test();
    printf("normal:\n");
    PreOrderTraverse(tree, 0);
    printf("\nreverse:\n");
    PreOrderTraverse(tree, 1);
    DestroyBiT(tree);
    return 0;
}
